docs: scope policy guidance in MCP instructions, README, and ADRs 0021/0022#3
Conversation
…1/0022 - mcp.rs: add scope policy sentence (explicit override vs resolved scope, scope_walk semantics) to the MCP tool instructions card - scope_resolution.rs: fix stale migration reference 0084 -> 0085 - README: document ADR-0021/0022 scoped memory parameters and scope_walk usage - ADR 0021/0022: content updates to match implementation - mcp_instructions.rs: pin the new instruction text - autoresearch.jsonl: append run logs 539-540
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR finalizes scope-related ADRs, expands README and MCP guidance, updates instruction tests, corrects a migration reference, and records two schema-hardening experiments, including one failed legacy migration replay. ChangesScope contract alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@doc/adr/0021-scope-as-first-class-memory-dimension.md`:
- Around line 78-97: Update the consequences section of the ADR to state that
the migration adds four scope indexes, including candidate_claims_scope, instead
of three. Keep the surrounding cost discussion unchanged.
In `@doc/adr/0022-connection-scope-resolution.md`:
- Around line 214-217: The scope fallback documentation is inconsistent across
layers. In doc/adr/0022-connection-scope-resolution.md lines 214-217, align the
origin-less repository fallback with ADR-0021’s canonical behavior instead of
documenting a conflicting absolute-worktree-root hash rule; in README.md lines
222-223, document that AVER_DEFAULT_SCOPE is checked before falling back to the
hardcoded global scope.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a553a094-9c1f-4e67-9ec2-b2e76414e62e
📒 Files selected for processing (7)
README.mdautoresearch.jsonlcrates/aver-server/src/mcp.rscrates/aver-server/src/scope_resolution.rscrates/aver-server/tests/mcp_instructions.rsdoc/adr/0021-scope-as-first-class-memory-dimension.mddoc/adr/0022-connection-scope-resolution.md
| without an origin (fresh clones, local-only experiments) fall back to hashing | ||
| the absolute worktree root. That avoids basename collisions but means moving a | ||
| local-only repository changes its derived scope. Mitigation: | ||
| `AVER_DEFAULT_SCOPE` override; explicit `--scope` flag on the shim. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Align the documented scope fallback contract across layers.
The current documentation gives clients conflicting expectations about how scopes are derived when no explicit per-call scope is supplied. Canonicalize both the origin-less repository fallback and the configured environment fallback.
doc/adr/0022-connection-scope-resolution.md#L214-L217: reconcile the absolute-path hash rule with ADR-0021’s origin-less fallback.README.md#L222-L223: document thatAVER_DEFAULT_SCOPEis checked before the hardcodedglobalfallback.
📍 Affects 2 files
doc/adr/0022-connection-scope-resolution.md#L214-L217(this comment)README.md#L222-L223
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@doc/adr/0022-connection-scope-resolution.md` around lines 214 - 217, The
scope fallback documentation is inconsistent across layers. In
doc/adr/0022-connection-scope-resolution.md lines 214-217, align the origin-less
repository fallback with ADR-0021’s canonical behavior instead of documenting a
conflicting absolute-worktree-root hash rule; in README.md lines 222-223,
document that AVER_DEFAULT_SCOPE is checked before falling back to the hardcoded
global scope.
|
Addressed the two review findings in c5b8704: corrected the ADR-0021 scope-index count and aligned the origin-less worktree hash plus Validation: — Hermes Agent |
Commits the previously-uncommitted working tree changes:
scopeonly as an explicit per-call override, otherwise the ADR-0022 resolved scope applies;scope_walk=ancestorsfor normal project memory,exactfor isolation,descendantsfor subtree audits,anyonly for cross-scope search.scope_walkusage; notes vector chunks inherit their claim's scope.Verified:
cargo test -p aver-server --test mcp_instructionsgreen,cargo fmt --checkclean.Summary by CodeRabbit